package engine;

import java.awt.event.KeyEvent;
import java.util.HashMap;

public class KeyBindingMap {

	private HashMap<KeyType, Integer> keyBindings;

	public KeyBindingMap() {
		this.keyBindings = new HashMap<KeyType, Integer>();
		createDefaultKeyBindingMap();
	}
	
	public int getKeyBinding(KeyType keyType) {
		 return this.keyBindings.get(keyType);
	 }
	
	public void changeKeyBinding(KeyType keyType, int key) {
		this.keyBindings.put(keyType, key);
	}
	
	 public void createDefaultKeyBindingMap() {		 
		 this.keyBindings.put(KeyType.NORTH, KeyEvent.VK_W);
		 this.keyBindings.put(KeyType.SOUTH, KeyEvent.VK_S);
		 this.keyBindings.put(KeyType.WEST, KeyEvent.VK_A);
		 this.keyBindings.put(KeyType.EAST, KeyEvent.VK_D);
	 }
	 
}
